﻿using System.Drawing;

namespace Accumulation.Common {
    /// <summary>
    /// 随机码生成选项
    /// <remarks>
    /// MatchZhou - 2009/1/19
    /// </remarks>
    /// </summary>
    public enum RandomType {
        /// <summary>
        /// 字母
        /// </summary>
        Letter,
        /// <summary>
        /// 数字
        /// </summary>
        Num,
        /// <summary>
        /// 特殊符号
        /// </summary>
        Symobl,
        /// <summary>
        /// 字母/数字
        /// </summary>
        LetterAndNum,
        /// <summary>
        /// 字母/特殊符号
        /// </summary>
        LetterAndSymbol,
        /// <summary>
        /// 数字/特殊符号
        /// </summary>
        NumAndSymbol,
        /// <summary>
        /// 字母/数字/特殊字符
        /// </summary>
        All
    }

    /// <summary>
    /// 随机码图片生成选项
    /// <remarks>
    /// MatchZhou - 2009/2/2
    /// </remarks>
    /// </summary>
    public class RandomConfig {
        /// <summary>
        /// 边补（字符间距）
        /// </summary> 
        public int Padding { get; set; }
        /// <summary>
        /// 字体大小
        /// </summary> 
        public int FontSize { get; set; }
        /// <summary>
        /// 字体颜色数组（随机颜色）
        /// </summary>
        public Color[] FontColor { get; set; }
        /// <summary>
        /// 字体类型数组（随机字体）
        /// </summary>
        public string[] FontFamily { get; set; }
        /// <summary>
        /// 背景色
        /// </summary>
        public Color BackgroundColor { get; set; }
        /// <summary>
        /// 干扰点颜色
        /// </summary>
        public Color ObstructionColor { get; set; }
        /// <summary>
        /// 干扰点数量
        /// </summary>
        public int ObstructionNum { get; set; }
    }

    /// <summary>
    /// alert 弹出消息操作类型
    /// <remarks>
    /// MatchZhou - 2009/1/19
    /// </remarks>
    /// </summary>
    public enum AlertType {
        /// <summary>
        /// 只弹出消息，不进行其它操作
        /// </summary>
        Information,
        /// <summary>
        /// 弹出消息，并指向指定的URL，例：location.href = 'abc.htm';
        /// </summary>
        RedirectToURL,
        /// <summary>
        /// 弹出消息，并后退指定的步数，例：history.go(-1)
        /// </summary>
        GoBack,
        /// <summary>
        /// 弹出消息，并关闭当前窗口，例：window.close()
        /// </summary>
        ClosePage,
        /// <summary>
        /// 弹出消息，并执行指定的代码的操作，例：parseInt('1');
        /// </summary>
        SpecifiedProcess
    }
}
